from . import flutter

TextStyle = flutter.TextStyle
Container = flutter.Container
Center = flutter.Center
Text = flutter.Text
Stack = flutter.Stack
Positioned = flutter.Positioned
Transform = flutter.Transform
LinearGradient = flutter.LinearGradient
Colors = flutter.Colors
TextAlign = flutter.TextAlign
EdgeInsets = flutter.EdgeInsets
FontWeight = flutter.FontWeight
FontStyle = flutter.FontStyle
BoxShadow = flutter.BoxShadow
BoxShape = flutter.BoxShape
RichText = flutter.RichText
TextSpan = flutter.TextSpan
TextOverflow = flutter.TextOverflow
BorderRadius = flutter.BorderRadius
Offset = flutter.Offset
Scaffold = flutter.Scaffold
AppBar = flutter.AppBar
IconButton = flutter.IconButton
Icon = flutter.Icon
Icons = flutter.Icons
TextButton = flutter.TextButton
OutlinedButton = flutter.OutlinedButton
ContainedButton = flutter.ContainedButton
Column = flutter.Column
Card = flutter.Card
ListTile = flutter.ListTile
ButtonBar = flutter.ButtonBar
FlatButton = flutter.FlatButton
MainAxisAlignment = flutter.MainAxisAlignment
Text = flutter.Text
FlatButton = flutter.FlatButton
Color = flutter.Colors
Children = flutter.Children
# Clip = flutter.Clip
ListView = flutter.ListView
PopupMenuDivider = flutter.PopupMenuDivider

def cards():
    return Scaffold(
        appBar=AppBar(
            title=Text('Dividers'),
            leading=Icon(Icons.arrow_back, href="http://localhost:8000/web/_main_.html"),
            actions=[
                Icon(Icons.refresh, href='dividers.html')
            ]
        ),
        body=ListView(
            children=[
                ListTile(
                    title=Text('Divider 1'),
                ),
                PopupMenuDivider(),
                ListTile(
                    title=Text('Divider 2'),
                ),
                PopupMenuDivider(color='red'),
                ListTile(
                    title=Text('Divider 3'),
                ),
                PopupMenuDivider(color='green'),
            ],
        ),
    )


def run_app():
    test_ = cards()
    javascript.document.body.appendChild(test_.render())
run_app()